/* 基础样式 */
body {
    font-family: 'Microsoft YaHei', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f5f5f5;
    color: #333;
    text-align: center;
}

/* 导航栏样式 */
nav {
    background-color: #2c3e50;
    color: white;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav a {
    color: white; /* 将链接颜色改为白色 */
    margin-right: 15px;
    text-decoration: none;
    font-size: 16px;
    transition: color 0.3s; /* 添加过渡效果 */
}

nav a:hover {
    color: #3498db; /* 将悬停颜色改为浅蓝色 */
}

/* 表单样式 */
form {
    max-width: 500px;
    margin: 30px auto;
    padding: 25px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    text-align: center; /* 居中对齐表单内容 */
}

input[type="text"],
input[type="password"],
input[type="file"] {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

/* 按钮样式 */
button {
    padding: 12px 24px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #2980b9;
}

/* 用户信息区域 */
#user-info {
    color: white;
}

/* 下拉菜单样式 */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    background-color: #f9f9f9;
    min-width: 160px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    z-index: 1;
    border-radius: 4px;
}

.dropdown-content a {
    color: #333;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
}

.dropdown-content a:hover {
    background-color: #f1f1f1;
}

.dropdown:hover .dropdown-content {
    display: block;
}

/* 暗黑模式样式 */
.dark-mode {
    background-color: #1a1a1a;
    color: #f0f0f0;
}

.dark-mode nav {
    background-color: #1e272e;
}

.dark-mode form {
    background-color: #2d3436;
    color: #f0f0f0;
}

.dark-mode input {
    background-color: #3d3d3d;
    color: #f0f0f0;
    border-color: #555;
}

/* 搜索结果样式 */
.repository {
    background-color: white;
    padding: 20px;
    margin: 15px 0;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.dark-mode .repository {
    background-color: #2d3436;
    color: #f0f0f0;
}

.file-list {
    list-style-type: none;
    padding: 0;
}

.file-list li {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.dark-mode .file-list li {
    border-bottom-color: #444;
}

/* 搜索容器 */
.search-container {
    max-width: 800px;
    margin: 20px auto;
    padding: 20px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.dark-mode .search-container {
    background-color: #2d3436;
}

/* 主题切换按钮 */
#theme-toggle {
    background-color: #95a5a6;
    margin-left: 15px;
}

#theme-toggle:hover {
    background-color: #7f8c8d;
}

/* 登录和注册页面的文字居中 */
#login-form,
#register-form,
#forget-password-form,
#notice-from {
    text-align: center;
}

#login-form h1,
#register-form h1,
#forget-password-form h1,
#notice-from h1 {
    margin-bottom: 20px;
}

/* 登录和注册页面的链接样式 */
#login-form a,
#register-form a,
#forget-password-form a,
#notice-from a {
    color: white; /* 将链接颜色改为白色 */
    text-decoration: none;
    font-size: 16px;
    transition: color 0.3s; /* 添加过渡效果 */
}

#login-form a:hover,
#register-form a:hover,
#forget-password-form a:hover
#notice-from a:hover {
    color: #3498db; /* 将悬停颜色改为浅蓝色 */
}

.repository a {
    color: white; /* 将链接颜色改为白色 */
    text-decoration: none;
    font-size: 16px;
    transition: color 0.3s; /* 添加过渡效果 */
}
.repository a:hover {
    color: #3498db; 
}

/* 分页样式 */

.pagination {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.pagination-button {
    padding: 5px 10px;
    margin: 0 5px;
    border: 1px solid #ccc;
    background-color: #f9f9f9;
    cursor: pointer;
}

.pagination-button.active {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}

/* 用户列表样式 */
#user-list-container {
    max-width: 800px;
    margin: 30px auto;
    padding: 25px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
}

#user-list-container h1 {
    margin-bottom: 20px;
}

#user-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

#user-table th, #user-table td {
    padding: 12px;
    text-align: left;
    border: 1px solid #ddd;
}

#user-table th {
    background-color: #f2f2f2;
}

#user-table input[type="text"],
#user-table input[type="email"],
#user-table select {
    width: 100%;
    padding: 8px;
    margin-bottom: 0;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

#user-table button {
    padding: 8px 16px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

#user-table button:hover {
    background-color: #2980b9;
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.pagination-button {
    padding: 5px 10px;
    margin: 0 5px;
    border: 1px solid #ccc;
    background-color: #f9f9f9;
    cursor: pointer;
}

.pagination-button.active {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}

/* 添加用户表单样式 */
/* 用户列表样式 */
#user-list-container {
    max-width: 800px;
    margin: 30px auto;
    padding: 25px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
}

#user-list-container h1 {
    margin-bottom: 20px;
}

#user-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

#user-table th, #user-table td {
    padding: 12px;
    text-align: left;
    border: 1px solid #ddd;
}

#user-table th {
    background-color: #f2f2f2;
}

#user-table input[type="text"],
#user-table input[type="email"],
#user-table select {
    width: 100%;
    padding: 8px;
    margin-bottom: 0;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

#user-table button {
    padding: 8px 16px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

#user-table button:hover {
    background-color: #2980b9;
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.pagination-button {
    padding: 5px 10px;
    margin: 0 5px;
    border: 1px solid #ccc;
    background-color: #f9f9f9;
    cursor: pointer;
}

.pagination-button.active {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}

/* 添加用户表单样式 */
#add-user-form {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#add-user-form input[type="text"],
#add-user-form input[type="password"],
#add-user-form input[type="email"],
#add-user-form select {
    width: 100%;
    max-width: 400px;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

#add-user-form button {
    padding: 12px 24px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

#add-user-form button:hover {
    background-color: #2980b9;
}

/* 暗黑模式样式 */
.dark-mode #user-list-container {
    background-color: #2d3436;
    color: #f0f0f0;
}

.dark-mode #user-table th {
    background-color: #3d3d3d;
}

.dark-mode #user-table input[type="text"],
.dark-mode #user-table input[type="email"],
.dark-mode #user-table select {
    background-color: #3d3d3d;
    color: #f0f0f0;
    border-color: #555;
}

.dark-mode #user-table button {
    background-color: #95a5a6;
}

.dark-mode #user-table button:hover {
    background-color: #7f8c8d;
}

.dark-mode #add-user-form input[type="text"],
.dark-mode #add-user-form input[type="password"],
.dark-mode #add-user-form input[type="email"],
.dark-mode #add-user-form select {
    background-color: #3d3d3d;
    color: #f0f0f0;
    border-color: #555;
}

.dark-mode #add-user-form button {
    background-color: #95a5a6;
}

.dark-mode #add-user-form button:hover {
    background-color: #7f8c8d;
}

login a {
    display: inline;
    background: #ff8525;
    border-bottom: 6px solid #ea6700;
    border-radius: 6px;
    padding-top: 10px;
    padding-bottom: 10px;
    padding-left: 20px;
    padding-right: 20px;
    color: #fff;
    text-decoration: none;
    font-size: 16px;
    font-weight: bold;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.3);
}

login a:hover {
    background: #ff9e52;
}

register a {
    display: inline;
    background:rgb(37, 179, 255);
    border-bottom: 6px solid rgb(122, 209, 255);
    border-radius: 6px;
    padding-top: 10px;
    padding-bottom: 10px;
    padding-left: 20px;
    padding-right: 20px;
    color: #fff;
    text-decoration: none;
    font-size: 16px;
    font-weight: bold;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.3);
}

register a:hover {
    background: rgb(70, 190, 255);
}


newpage {
    background-color: white;
    padding: 20px;
    margin: 15px 0;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* 公告表单样式 */
#notice-form {
    max-width: 600px;
    margin: 50px auto;
    padding: 30px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
}

#notice-form h1 {
    margin-bottom: 20px;
    font-size: 24px;
    color: #333;
}

#notice-form textarea {
    width: 100%;
    height: 150px;
    padding: 12px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 16px;
    resize: vertical;
}

#notice-form button {
    padding: 12px 24px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

#notice-form button:hover {
    background-color: #2980b9;
}